package br.edu.fasete.javaroad.model.architeture;

import java.io.Serializable;

public class Component implements Serializable{
	private static final long serialVersionUID = 2L;
	private String name;
	private String description;
	private String template;
	private String directory;
	private String filename;
	private String fileExtension;
	private boolean multiple;
	private boolean onlyDao;
	private boolean directoryAbsolute;
	private boolean useClass;
	private boolean useInterface;
	
	
	
	
	public boolean isUseClass() {
		return useClass;
	}
	public void setUseClass(boolean useClass) {
		this.useClass = useClass;
	}
	public boolean isUseInterface() {
		return useInterface;
	}
	public void setUseInterface(boolean useInterface) {
		this.useInterface = useInterface;
	}
	public boolean isDirectoryAbsolute() {
		return directoryAbsolute;
	}
	public void setDirectoryAbsolute(boolean directoryAbsolute) {
		this.directoryAbsolute = directoryAbsolute;
	}
	public String getFilename() {
		return filename;
	}
	public void setFilename(String filename) {
		this.filename = filename;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getTemplate() {
		return template;
	}
	public void setTemplate(String template) {
		this.template = template;
	}
	public String getDirectory() {
		return directory;
	}
	public void setDirectory(String directory) {
		this.directory = directory;
	}
	public boolean isMultiple() {
		return multiple;
	}
	public void setMultiple(boolean multiple) {
		this.multiple = multiple;
	}
	public boolean isOnlyDao() {
		return onlyDao;
	}
	public void setOnlyDao(boolean onlyDao) {
		this.onlyDao = onlyDao;
	}
	
	
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getFileExtension() {
		return fileExtension;
	}
	public void setFileExtension(String fileExtension) {
		this.fileExtension = fileExtension;
	}
	public boolean equals(Object arg0) {
		if(arg0 instanceof Component) {
			return this.name.equalsIgnoreCase(((Component) arg0).getName());
		} else {
			return false;
		}
	}
	
	public String toString() {
		return this.name;
	}
}
